package com.lesylphe.memoryboost;

public class Score {

	private int bonnesReponses, mauvaisesResponses;

	public int getBonnesReponses() {
		return bonnesReponses;
	}

	public void setBonnesReponses(int bonnesReponses) {
		this.bonnesReponses = bonnesReponses;
	}

	public int getMauvaisesResponses() {
		return mauvaisesResponses;
	}

	public void setMauvaisesResponses(int mauvaisesResponses) {
		this.mauvaisesResponses = mauvaisesResponses;
	}

	public String getCompteRendu() {
		int total = bonnesReponses + mauvaisesResponses;
		float f = ((float) bonnesReponses / total) * 100;
		return "" + bonnesReponses + " bonnes réponses, " + mauvaisesResponses
				+ " mauvaises, soit un ratio de succès de " + f + " %";
	}

	public void prendreEnCompteReponse(boolean b) {
		if (b) {
			bonnesReponses++;
		} else {
			mauvaisesResponses++;
		}

	}

}
